﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Ledict.ConditionExtract.Base;
using Ledict.Utility.Helper;

namespace Ledict.ConditionExtract.Frm.NodeTree
{
    public partial class frmDictEdit : BaseForm
    {
        public string m_dictCode = "TextType";
        private readonly static object _lock = new object();
        private static frmDictEdit _instance;

        public static frmDictEdit Instance
        {
            get
            {
                if (_instance == null || _instance.IsDisposed)
                {
                    lock (_lock)
                    {
                        if (_instance == null || _instance.IsDisposed)
                        {
                            _instance = new frmDictEdit();
                        }
                    }
                }
                return _instance;
            }
        }

        public frmDictEdit()
        {
            InitializeComponent();
        }

        private void frmDictEdit_Load(object sender, EventArgs e)
        {
            if (m_dictCode == "TextType") this.Text = "版本信息维护";
            else if(m_dictCode == "Purpose") this.Text = "用途信息维护";
            string at_id = ConfigHelper.AppSettings(m_dictCode);
            webBrowser1.Url = new Uri(ConfigHelper.AppSettings("DictEditUrl") + "?AT_ID=" + at_id);
        }
    }
}
